// 建议dispatch/commit调用，均采用如下形式包裹一层，以启用类型推导

import store from './index';
import {InterfaceUser} from '@/interface/InterfaceUser';
import * as type from './mutation-types';


export const updateUser = (user: InterfaceUser) => {
    return store.commit(type.USER_UPDATE, user);
};

export const exitUser = () => {
    return store.commit(type.USER_EXIT);
};
//
// export const dispatchAddToCart = (product: Product) => {
//   return store.dispatch('addToCart', product)
// }
